<template>
<el-main>
  <span class="icon iconfont icon-hamburger" :class="{'is-collapse':isCollapse}" @click="toggleAsideBar"></span>
  <router-view></router-view>
</el-main>
</template>

<script>
export default {
props:["isCollapse","toggleVollapse"],
methods:{
  toggleAsideBar(){
    this.toggleVollapse()
  }
}
}
</script>

<style lang="less" scoped>
.el-main{
  position: relative;
  padding: 50px;
}
.icon-hamburger{
  font-size: 25px;
  cursor: pointer;
  position: absolute;
  left: 20px;
  top: 20px;
  transition: all .2s ease 0s
}
.is-collapse{
  transform: rotate(90deg);
}
</style>